package com.xc.controller;

import com.xc.entity.UserEntity;
import com.xc.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
//@ResponseBody
public class LoginController {

    @Autowired
    private UserService userService;

    @RequestMapping("/login")
    public String getName(String username, String password) {

        return userService.login(new UserEntity( username, password));
    }


}
